import request from '@/utils/request'

var url = process.env.VUE_APP_SUM_KF;
var url_pub = process.env.VUE_APP_SUM_PUB;
console.log('work.js', url)

// 获取工单分类列表-总接口获取
export function List(data) {
  return request({
    url: url + '/service-center/open/work-order-type/label-list',
    method: 'post',
    data: data
  })
}


export function getList(data) {
  return request({
    url: url + '/service-center/open/work-order/list',
    method: 'post',
    data: data
  })
}

//获取工单消息列表
export function getWorkMessageList(data) {
  return request({
    url: url + '/service-center/open/work-order/message-list',
    method: 'post',
    data: data
  })
}

// 新增
export function Add(data) {
  return request({
    url: url + '/service-center/open/work-order/submit',
    method: 'post',
    data: data
  })
}



export function Show(data) {
  return request({
    url: url + '/service-center/open/work-order/detail',
    method: 'post',
    data: data
  })
}

// 修改
export function Update(data) {
  return request({
    url: '/job/' + data.id,
    method: 'put',
    data: data
  })
}




export function Delete(data) {
  return request({
    url: url + '/service-center/open/work-order/delete',
    method: 'post',
    data: data
  })
}

//工单反馈
export function Gdfk(data) {
  return request({
    url: url + '/service-center/open/work-order/message',
    method: 'post',
    data: data
  })
}

//完结
export function Finish(data) {
  return request({
    url: url + '/service-center/open/work-order/finish',
    method: 'post',
    data: data
  })
}

//评价
export function evaluate(data) {
  return request({
    url: url + '/service-center/open/work-order/evaluate',
    method: 'post',
    data: data
  })
}



//创建工具服
export function AddWork(data) {
  return request({
    url: url_pub + '/tool-server/district-service/create',
    method: 'post',
    data: data
  })
}

//修改工具服
export function UpdateWork(data) {
  return request({
    url: url_pub + '/tool-server/district-service/modify',
    method: 'post',
    data: data
  })
}


//删除工具服
export function DeleteWork(data) {
  return request({
    url: url_pub + '/tool-server/district-service/delete',
    method: 'post',
    data: data
  })
}




//工具服列表
export function getToolConList(data) {
  return request({
    url: url_pub + '/tool-server/district-service/list',
    method: 'post',
    data: data
  })
}


//查询PC登录器列表
export function getPcList(data) {
  return request({
    url: url_pub + '/lander/list',
    method: 'post',
    data: data
  })
}

//查询PC登录器生成---状态
export function getSelectState(data) {
  return request({
    url: url_pub + '/lander/select-state',
    method: 'post',
    data: data
  })
}





//工具服详情
export function getToolConInfo(data) {
  return request({
    url: url_pub + '/tool-server/district-service/detail',
    method: 'post',
    data: data
  })
}


//生成测试登录器
export function generate(data) {
  return request({
    url: url_pub + '/lander/generate',
    method: 'post',
    data: data
  })
}



//更新登录器
export function updateLogger(data) {
  return request({
    url: url_pub + '/lander/update',
    method: 'post',
    data: data
  })
}



//下载登录器
export function download(data) {
  return request({
    url: url_pub + '/lander/download',
    method: 'post',
    data: data
  })
}



// 绑定客户端
export function Binding(data) {
  return request({
    url: url + '/service-center/open/websocket/init',
    method: 'post',
    data: data
  })
}



//删除登陆器记录
export function DeleteDlq(data) {
  return request({
    url: url_pub + '/lander/delete',
    method: 'post',
    data: data
  })
}



